package faw.car.sdv.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

public class SdvAnnotations {

    @Retention(RetentionPolicy.RUNTIME)
    @Target(ElementType.PACKAGE)
    public @interface SdvPackage {
        String name();
        String desc();
        String version();
    }

    @Retention(RetentionPolicy.RUNTIME)
    @Target(ElementType.PACKAGE)
    public @interface SdvPackageDependency {
        String packageName();
        String packageVersion();
    }

    @Retention(RetentionPolicy.RUNTIME)
    @Target(ElementType.TYPE)
    public @interface SdvOperator {
        String name();
        String desc();
    }

    @Retention(RetentionPolicy.RUNTIME)
    @Target(ElementType.TYPE)
    public @interface SdvOperatorMeta {
        String type();
        String version();
        String date();
        String author();
    }

    @Retention(RetentionPolicy.RUNTIME)
    @Target(ElementType.TYPE)
    public @interface SdvOperatorDependency {
        String packageName();
        String packageVersion();
        String operator();
        String operatorVersion();
    }

    @Retention(RetentionPolicy.RUNTIME)
    @Target(ElementType.METHOD)
    public @interface SdvOpFunc {
        String name();
        String desc();
        String type();  // 操作类型，如：read、execute、check、watch、info
    }

    @Retention(RetentionPolicy.RUNTIME)
    @Target(ElementType.METHOD)
    public @interface SdvOpAlias {
        String alias();
        String desc();
        String parameter();
        String value() default "";
    }

    @Retention(RetentionPolicy.RUNTIME)
    @Target(ElementType.PARAMETER)
    public @interface SdvOpParameter {
        String name();
        String desc();
        String type();
        String validRange() default "";
    }

    @Retention(RetentionPolicy.RUNTIME)
    @Target(ElementType.METHOD)
    public @interface SdvOpReturn {
        String name();
        String desc();
        String type();
    }
}